//Active Menu Effect
$(document).ready(function() {
    $("li a[href]").each(function() {
        if (this.href == window.location.href) {
            $(this).addClass('active');
        }
    });

    $("ul#left-menu a[href]").each(function() {
        if (this.href == window.location.href) {
            $(this).parent().addClass('liact');
        }
    });


});

//Jquery Tab
$(document).ready(function() {
    $("ul.tabs li").click(function() {
        var tab_id = $(this).attr("data-tab");
        localStorage.selectedTab = $(this).attr("id");

        $("ul.tabs li").removeClass("current");
        $(".tab-content").removeClass("current");

        $(this).addClass("current");
        $("#" + tab_id).addClass("current");
    });

    if ($(localStorage.selectedTab)) {
        $("#" + localStorage.selectedTab).click();
    } else {
        $("#tab1").click();
    }
});

function doCheckAll() {
    var headCheck = document.getElementById('checkAll');
    var listCheck = document.getElementsByName('checkOne[]');
    if (headCheck.checked) {
        for (var i = 0; i < listCheck.length; i++) {
            listCheck[i].checked = true;
        }
    } else {
        for (i = 0; i < listCheck.length; i++) {
            listCheck[i].checked = false;
        }
    }
}